<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="menu.chooseEmployee"/></title>
    <meta name="heading" content="<fmt:message key='menu.chooseEmployee'/>"/>

 <%@ include file="/common/meta.jsp" %>
        <title><decorator:title/> | <fmt:message key="webapp.name"/></title>
        <!--
        <link rel="stylesheet" type="text/css" media="all" href="<c:url value='/styles/${appConfig["csstheme"]}/theme.css'/>" />
        -->
        <link rel="stylesheet" type="text/css" media="screen" href="<c:url value='/styles/flexy/css/style_all.css'/>" />
        <link rel="stylesheet" type="text/css" media="screen" href="<c:url value='/styles/flexy/css/style1.css'/>" />
        <link rel="stylesheet" type="text/css" media="screen" href="<c:url value='/styles/flexy/css/autocomplete-styles.css'/>" />
        <link rel="stylesheet" type="text/css" media="screen" href="<c:url value='/styles/flexy/css/jquery-ui.css'/>" />
        <link rel="stylesheet" type="text/css" media="screen" href="<c:url value='/styles/flexy/css/jquery.wysiwyg.css'/>" />



        <script type="text/javascript" src="<c:url value='/scripts/prototype.js'/>"></script>
        <script type="text/javascript" src="<c:url value='/scripts/scriptaculous.js'/>"></script>
        <script type="text/javascript" src="<c:url value='/scripts/global.js'/>"></script>
        <script type='text/javascript' src="<c:url value='/styles/flexy/js/jquery.js'/>"></script>
        <script type='text/javascript' src="<c:url value='/styles/flexy/js/jquery-ui.js'/>"></script>
        <script type='text/javascript' src="<c:url value='/styles/flexy/js/jquery.wysiwyg.js'/>"></script>
        <script type='text/javascript' src="<c:url value='/styles/flexy/js/custom.js'/>"></script>
        <script type='text/javascript' src="<c:url value='/styles/flexy/js/autocomplete.js'/>"></script>
        <!--<script type='text/javascript' src="<c:url value='/styles/flexy/js/transliteration.js'/>"></script>-->

        <style>
        .treeview ul{ /*CSS for Simple Tree Menu*/
margin: 0;
padding: 0;
background: #e3e3e3;
}

.treeview li{ /*Style for LI elements in general (excludes an LI that contains sub lists)*/
background: #e3e3e3 url(list.gif) no-repeat left center;
list-style-type: none;
padding-left: 22px;
margin-bottom: 3px;
}

.treeview ul:selected{ /*Style for LI elements in general (excludes an LI that contains sub lists)*/
background: lightgray ;
}

.treeview li.submenu{ /* Style for LI that contains sub lists (other ULs). */
background: #e3e3e3 url(closed.gif) no-repeat left 1px;
cursor: hand !important;
cursor: pointer !important;
}


.treeview li.submenu ul{ /*Style for ULs that are children of LIs (submenu) */
display: none; /*Hide them by default. Don't delete. */
}

.treeview .submenu ul li{ /*Style for LIs of ULs that are children of LIs (submenu) */
cursor: default;
}

            html{
	background:#e3e3e3;
	}

body{
	font-size:12px;
	font-family:"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, Verdana, sans-serif;
	line-height:1.5em;
	}

				.button{
					border:1px solid #959595;
					font-size:12px;
					font-family:"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, Verdana, sans-serif;
					background-color:#eaeaea;
					padding:4px 15px 4px 15px;
					color:#fff;
					cursor:pointer;
					}

				.button:hover{
					background-color: #f4f4f4;
					}




p{padding:0 5px 22px 0}

a{color:#222; text-decoration:underline;}
a:hover{color:#333; text-decoration:none;}

.clearboth{
    clear:both;
}

.button{
	background:#a8b2c5 url(../images/highlight_line.gif) repeat-x top left;

}

.button:hover{
	background:#999;

}
        </style>

</head>

<div class="jquery_tab_container">
    <span class="heading_tab advanced_link active tab1"><fmt:message key="menu.vehicleDamageSearch"/></span>
</div>

<div class="jquery_tab">
    <div class="content_block"></div>

<h2 style="margin-left: 20px; color: black;"> <appfuse:label key="employee.chooseEmployee"/> </h2>
<form:form commandName="solutionsForDeployment" method="post" action="chooseemployee" id="solutionsForDeployment" onsubmit="return validateEmployee(this)">
    <form:hidden path="type" id="type" />
    <p>
        <appfuse:label  styleClass="left width150" key="employee.registrationNo"/>
        <form:input path="employee.registrationNo" cssClass="input-medium left"/>
        <br class="clearboth">
        </p>
        <p>
        <appfuse:label styleClass="left width150" key="employee.lastName"/>
        <form:input path="employee.lastName" cssClass="input-medium left"/>
        <br class="clearboth">
        </p>
        <p>
        <appfuse:label styleClass="left width150" key="employee.firstName"/>
        <form:input path="employee.firstName" cssClass="input-medium left"/>
        <br class="clearboth">
        </p>
        <p>
        <appfuse:label styleClass="left width150" key="employee.embg"/>
        <form:input path="employee.id.embg" cssClass="input-medium left" />
        <br class="clearboth">
        </p>
        <p class="buttonBar bottom">
        <input type="submit" class="button" name="save" value="<fmt:message key="button.search"/>"/>
        </p>
    </form:form>
        <p>
    <display:table name="employeeList" class="table" requestURI="" id="employeeList" export="false" pagesize="25">
        <display:column property="registrationNo" titleKey="employee.registrationNo" sortable="true" href="chooseemployee?" media="html"
        paramId="firstName" paramProperty="firstName" />
    <display:column class="lastName" property="lastName" sortable="true" titleKey="employee.lastName"/>
    <display:column class="firstName" property="firstName" sortable="true" titleKey="employee.firstName"/>
    <display:column class="embg" property="id.embg" sortable="true" titleKey="employee.embg"/>

</display:table>
        </p>
</div>

<v:javascript formName="solutionsForDeployment" cdata="false" dynamicJavascript="true" staticJavascript="false"/>
<script type="text/javascript" src="<c:url value='/scripts/validator.jsp'/>"></script>

<script type="text/javascript">

        highlightTableRows("employeeList");
    Form.focusFirstElement($('solutionsForDeployment'));


        jQuery(".click").click(function(){
            var idval = this.id;
            jQuery("#ouid").val(idval);
                                   });

        jQuery(".submenu").click(function(){
            var idval = this.id;
            jQuery("#ouid").val(idval);
                                   });

        

    function getUrlVars() {
	    var vars = {};
	    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
	        vars[key] = value;
	    });
	    return vars;
	}

    </script>

<script type="text/javascript">
     var bCancel = false;

    function validateEmployee(form) {
        if (bCancel)
      return true;
        else
       return validateInteger(form);
   }
    function IntegerValidations () {
     this.aa = new Array("employee.registrationNo", "<fmt:message key="employee.registrationNo"/> <fmt:message key="errors.integerS"/>", new Function ("varName", " return this[varName];"));
     this.ab = new Array("employee.id.embg", "<fmt:message key="employee.embg"/> <fmt:message key="errors.integerS"/>", new Function ("varName", " return this[varName];"));
    }


</script>